package com.hlkj.pay.infrastructure.model.order;

import java.math.BigDecimal;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hlkj.framework.mybatis.core.dataobject.BaseDO;
import com.hlkj.pay.app.merchant.ext.impl.wxpay.dto.OrderComplaintMediaDto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;


/**
* 订单投诉表
* @TableName t_order_complaint
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("t_order_complaint")
public class OrderComplaintDO extends BaseDO {

    @Schema(description = "投诉渠道ID")
    private Long channelId;

    @Schema(description = "平台订单号")
    private String payOrderNo;

    @Schema(description = "商户订单号")
    private String mchOrderNo;

    @Schema(description = "投诉单关联的机构订单号")
    private String wxOrderNo;

    @Schema(description = "投诉单号")
    private String complaintId;

    /**
     * PENDING-待处理 0
     * PROCESSING-处理中 1
     * PROCESSED-已处理完成 2
     */
    @Schema(description = "投诉状态'")
    private Integer status;
    /**
    * 
    */
    @Schema(description = "渠道类型 1:微信 2：支付宝")
    private Integer type;

    @Schema(description = "签名方式 RSA2,MD5")
    private String signType;

    @Schema(description = "商户商户号")
    private String sn;

    @TableField(exist = false)
    @Schema(description = "商户名称")
    private String snName;

    @Schema(description = "默认服务商")
    private String providerCode;

    @TableField(exist = false)
    @Schema(description = "默认服务商")
    private String providerName;

    @Schema(description = "渠道编码")
    private String channelCode;

    @TableField(exist = false)
    @Schema(description = "渠道名称")
    private String channelName;

    @Schema(description = "商户号")
    private String appId;

    @Schema(description = "联系人手机号")
    private String phone;

    @Schema(description = "金额")
    private BigDecimal amount;

    @Schema(description = "投诉次数")
    private Integer num;

    @Schema(description = "投诉详情")
    private String detail;

    @Schema(description = "问题描述")
    private String problemDesc;
    /**
     * REFUND: 申请退款
     * SERVICE_NOT_WORK: 服务权益未生效
     * OTHERS: 其他类型
     */
    @Schema(description = "问题类型")
    private String problemType;

    @Schema(description = "申请退款金额")
    private BigDecimal refundAmount;

    @TableField(exist = false)
    @Schema(description = "投诉图片微信MediaId集合")
    private List<OrderComplaintMediaDto> complaintMedias;

    @Schema(description = "投诉图片地址")
    private String complaintMediaJson;

    @Schema(description = "是否有退款")
    private Integer refunded;

    @Schema(description = "是否有留言")
    private Integer response;

    @Schema(description = "是否有平台介入")
    private Integer platform;

}
